<?php
class def{
    var $main_func = 'autoload';

    function def($args){
        if(!isset($args['func']) || $args['func'] == '') $args['func'] = $this->main_func;
        $this->$args['func']($args);
    }
  
    private function autoload($args){
		global $forms;
        echo $forms->eval_form('main',$this);
		echo $forms->eval_form('body',$this);
    }
	
	public function projects(){
		global $core,$template;
		$ret = '';
		$images = opendir($template->img_path(get_class($this)).'/projects');
		while($file = readdir($images)){
			if ($core->check_file_name($file)) $ret .= '<a href="'.$template->img_path(get_class($this)).'/projects/'.$file.'"><img src="'.$template->img_path(get_class($this)).'/projects/'.$file.'" style="width:210px;"></a>';
		}
		return $ret;
	}
}
?>
